From: Keir Fraser Date: Tue, 15 Jun 2010 12:21:03 +0000 (+0100) Subject: x86: return value of domain_pirq_to_irq() is signed X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~11923 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=a564071cae63590b61367eee1da32466a8e5cc39;p=xen.git x86: return value of domain_pirq_to_irq() is signed That value can, for forcibly unbound PIRQs, validly be negative, and for the respective check to catch those cases (and prevent using these negative values as array index), the respective variables must be of signed type. Signed-off-by: Jan Beulich --- diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index c4ca46c329..800ae7e790 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -875,7 +875,7 @@ static void __do_IRQ_guest(int irq) struct irq_desc *domain_spin_lock_irq_desc( struct domain *d, int pirq, unsigned long *pflags) { - unsigned int irq; + int irq; unsigned long flags; struct irq_desc *desc; @@ -1042,7 +1042,7 @@ extern int ioapic_ack_new; static int pirq_acktype(struct domain *d, int pirq) { struct irq_desc *desc; - unsigned int irq; + int irq; irq = domain_pirq_to_irq(d, pirq); if ( irq <= 0 )